<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript">
        window.onclick = function () {
            // console.log("JSON=", JSON)
            var jsonPerson = {
                "name": "jack",
                "age": 20
            }
            console.log("jsonPerson", jsonPerson)
            var strPerson = JSON.stringify(jsonPerson);
            console.log("strPerson= ", strPerson, " strPerson类型= ", typeof strPerson)

            var strDog = "{\"name\":\"小黑狗\",\"age\":2}";
            var jsonDog = JSON.parse(strDog);
            console.log("jsonDog=", jsonDog)
        }
    </script>
</head>
<body>

</body>
</html>